
import 'package:baby/UI/Widgets/HtmlContent/TransformUnit.dart';
import 'package:flutter/material.dart';
import 'package:html/dom.dart' as prefix0;

import '../HtmlContent.dart';

class TagP extends TransformUnit<HtmlContentState, Object> {
  var tags = [
    "p",
  ];
  @override
  void execution(context, data) {
    if (data is prefix0.Element && tags.contains(data.localName)){

      var childs = data.nodes.map((node) => pipeLineContext.process(node)).where((widget) => widget is Widget).toList();

      pipeLineContext.processWith(Column(
        mainAxisSize: MainAxisSize.min,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [...childs],
      ));
    }
  }
}
